Optimal. Leaf size=98 \[ -\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2917, 2691,
3853, 3855, 2687, 30} \begin {gather*} -\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2687
Rule 2691
Rule 2917
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^4(c+d x) \csc ^2(c+d x) \, dx+a \int \cot ^4(c+d x) \csc ^3(c+d x) \, dx\\ &=-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}-\frac {1}{2} a \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx+\frac {a \text {Subst}\left (\int x^4 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=-\frac {a \cot ^5(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {1}{8} a \int \csc ^3(c+d x) \, dx\\ &=-\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {1}{16} a \int \csc (c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 175, normalized size = 1.79 \begin {gather*} -\frac {a \cot ^5(c+d x)}{5 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{384 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{384 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 118, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{48}+\frac {\cos \left (d x +c \right )}{16}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d}\) | \(118\) |
default | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{48}+\frac {\cos \left (d x +c \right )}{16}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d}\) | \(118\) |
risch | \(\frac {a \left (15 \,{\mathrm e}^{11 i \left (d x +c \right )}+235 \,{\mathrm e}^{9 i \left (d x +c \right )}-240 i {\mathrm e}^{10 i \left (d x +c \right )}+390 \,{\mathrm e}^{7 i \left (d x +c \right )}+240 i {\mathrm e}^{8 i \left (d x +c \right )}+390 \,{\mathrm e}^{5 i \left (d x +c \right )}-480 i {\mathrm e}^{6 i \left (d x +c \right )}+235 \,{\mathrm e}^{3 i \left (d x +c \right )}+480 i {\mathrm e}^{4 i \left (d x +c \right )}+15 \,{\mathrm e}^{i \left (d x +c \right )}-48 i {\mathrm e}^{2 i \left (d x +c \right )}+48 i\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{16 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{16 d}\) | \(186\) |
norman | \(\frac {-\frac {a}{384 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{160 d}+\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}+\frac {a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d}+\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}+\frac {a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d}-\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}+\frac {a \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}+\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}\) | \(254\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 106, normalized size = 1.08 \begin {gather*} \frac {5 \, a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} + 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {96 \, a}{\tan \left (d x + c\right )^{5}}}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 187 vs.
\(2 (88) = 176\).
time = 0.36, size = 187, normalized size = 1.91 \begin {gather*} \frac {96 \, a \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + 30 \, a \cos \left (d x + c\right )^{5} + 80 \, a \cos \left (d x + c\right )^{3} - 30 \, a \cos \left (d x + c\right ) - 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{480 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 201 vs.
\(2 (88) = 176\).
time = 0.64, size = 201, normalized size = 2.05 \begin {gather*} \frac {5 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 12 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 120 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {294 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 120 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.51, size = 337, normalized size = 3.44 \begin {gather*} \frac {a\,\left (5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-5\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+12\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-12\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-60\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+60\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+120\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\right )}{1920\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________